package com.china.produce.pojo.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.china.produce.convert.GenderConverter;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.Date;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/3/5
 */
@Data
@AllArgsConstructor
public class Member {

    @ExcelProperty("ID")
    @ColumnWidth(10)
    private Long id;

    @ExcelProperty("用户名")
    @ColumnWidth(20)
    private String username;

    @ExcelIgnore
    private String password;

    @ExcelProperty("昵称")
    @ColumnWidth(20)
    private String nickname;

    @ExcelProperty("生日日期")
    @DateTimeFormat("yyyy-MM-dd")
    @ColumnWidth(25)
    private Date birthday;

    @ExcelProperty("手机号码")
    @ColumnWidth(20)
    private String phone;

    @ExcelProperty(value = "性别", converter = GenderConverter.class)
    @ColumnWidth(10)
    private Integer gender;
}
